home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Documents / Other / KBNS.verification.32.1 / KBNS.11.3.011 / protoTest.m2 < prev   
Text File  |  1994-01-08  |  698b  |  32 lines

  1. // For TEST..., see KBNS.11.3.012
  2. #ifndef TESTWITHOUTIMPORTEDHEADERS
  3. #ifndef __cplusplus
  4. #import <objc/Object.h>
  5. #import <objc/Protocol.h>
  6. #import <stdio.h>
  7. #else /* #ifndef __cplusplus */
  8. extern "Objective-C"
  9. {
  10. #import <objc/Object.h>
  11. #import <objc/Protocol.h>
  12. }
  13. extern  "C"
  14. {
  15. #import <stdio.h>
  16. }
  17. #endif /* #ifndef __cplusplus */
  18. #endif /* #ifndef TESTWITHOUTIMPORTEDHEADERS */
  19.  
  20. @protocol TestProto
  21. -why:(id)hi that:(bycopy id)hello;
  22. @end
  23.  
  24. int main(void){
  25.   /*var*/ struct objc_method_description* md;
  26.   md=[@protocol(TestProto) descriptionForInstanceMethod:@selector(why:that:)];
  27.   fprintf(stderr,"%s   %s\n",[@protocol(TestProto) name], md->types);
  28.   #ifndef __cplusplus
  29.   exit(0);
  30.   #endif
  31.   }
  32.